<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
    <RootNamespace>System.Reflection</RootNamespace>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <EnableAOTAnalyzer>false</EnableAOTAnalyzer>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
    <IsPackable>true</IsPackable>
    <NoWarn>$(NoWarn);CA1865</NoWarn>
    <PackageDescription>Provides read-only reflection on assemblies in an isolated context with support for assemblies that target different processor architectures and runtimes. Using MetadataLoadContext enables you to inspect assemblies without loading them into the main execution context. Assemblies in MetadataLoadContext are treated only as metadata, that is, you can read information about their members, but cannot execute any code contained in them.</PackageDescription>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="System\CoreRtBridge.cs" />
    <Compile Include="System\Reflection\DefaultBinder.cs" />
    <Compile Include="System\Reflection\DefaultBinder.CanConvert.cs" />
    <Compile Include="System\Reflection\MetadataAssemblyResolver.cs" />
    <Compile Include="System\Reflection\MetadataLoadContext.Apis.cs" />
    <Compile Include="System\Reflection\MetadataLoadContext.CoreAssembly.cs" />
    <Compile Include="System\Reflection\MetadataLoadContext.Disposing.cs" />
    <Compile Include="System\Reflection\MetadataLoadContext.KnownConstructors.cs" />
    <Compile Include="System\Reflection\MetadataLoadContext.Loading.cs" />
    <Compile Include="System\Reflection\MetadataLoadContext.Resolving.cs" />
    <Compile Include="System\Reflection\PathAssemblyResolver.cs" />
    <Compile Include="System\Reflection\Runtime\AssemblyNameHelpers.cs" />
    <Compile Include="System\Reflection\Runtime\SignatureTypeExtensions.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\ConstructorPolicies.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\EventPolicies.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\FieldPolicies.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\MemberPolicies.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\MemberTypeIndex.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\MethodPolicies.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\NameFilter.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\NameFilter.Ecma.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\NestedTypePolicies.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\QueriedMemberList.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\QueryResult.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\QueryResult.Enumerator.cs" />
    <Compile Include="System\Reflection\Runtime\BindingFlagSupport\Shared.cs" />
    <Compile Include="System\Reflection\Runtime\General\ListBuilder.cs" />
    <Compile Include="System\Reflection\TypeLoading\Assemblies\AssemblyFileInfo.cs" />
    <Compile Include="System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.cs" />
    <Compile Include="System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.GetName.cs" />
    <Compile Include="System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.ManifestResources.cs" />
    <Compile Include="System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.Modules.cs" />
    <Compile Include="System\Reflection\TypeLoading\Assemblies\RoAssembly.cs" />
    <Compile Include="System\Reflection\TypeLoading\Assemblies\RoAssembly.GetForwardedTypes.cs" />
    <Compile Include="System\Reflection\TypeLoading\Assemblies\RoAssembly.Modules.cs" />
    <Compile Include="System\Reflection\TypeLoading\Assemblies\RoExceptionAssembly.cs" />
    <Compile Include="System\Reflection\TypeLoading\Assemblies\RoStubAssembly.cs" />
    <Compile Include="System\Reflection\TypeLoading\Constructors\RoConstructor.cs" />
    <Compile Include="System\Reflection\TypeLoading\Constructors\RoDefinitionConstructor.cs" />
    <Compile Include="System\Reflection\TypeLoading\Constructors\RoSyntheticConstructor.cs" />
    <Compile Include="System\Reflection\TypeLoading\CustomAttributes\CustomAttributeArguments.cs" />
    <Compile Include="System\Reflection\TypeLoading\CustomAttributes\CustomAttributeHelpers.cs" />
    <Compile Include="System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeData.cs" />
    <Compile Include="System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs" />
    <Compile Include="System\Reflection\TypeLoading\CustomAttributes\RoCustomAttributeData.cs" />
    <Compile Include="System\Reflection\TypeLoading\CustomAttributes\RoPseudoCustomAttributeData.cs" />
    <Compile Include="System\Reflection\TypeLoading\Events\Ecma\EcmaEvent.cs" />
    <Compile Include="System\Reflection\TypeLoading\Events\RoEvent.cs" />
    <Compile Include="System\Reflection\TypeLoading\Fields\Ecma\EcmaField.cs" />
    <Compile Include="System\Reflection\TypeLoading\Fields\RoField.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Assignability.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\AssemblyNameData.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\CoreType.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\CoreTypes.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\EcmaDefaultValueProcessing.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\EcmaHelpers.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\EcmaPinnedTypeProvider.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\EcmaResolver.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\EcmaSignatureTypeProviderForToString.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\EcmaToStringHelpers.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\EcmaWrappedTypeProvider.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\GuardedPEReader.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\InternalManifestResourceInfo.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\MetadataExtensions.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Ecma\MetadataTable.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\HashHelpers.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Helpers.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\MethodSig.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\RoAssemblyName.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Sentinels.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\TypeContext.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\TypeExtensions.net.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' &gt;= '8.0'" />
    <Compile Include="System\Reflection\TypeLoading\General\TypeExtensions.net7.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' &lt; '8.0'" />
    <Compile Include="System\Reflection\TypeLoading\General\TypeExtensions.netstandard.cs" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
    <Compile Include="System\Reflection\TypeLoading\General\TypeFactories.cs" />
    <Compile Include="System\Reflection\TypeLoading\General\Utf8Constants.cs" />
    <Compile Include="System\Reflection\TypeLoading\MethodBase\IMethodDecoder.cs" />
    <Compile Include="System\Reflection\TypeLoading\MethodBase\IRoMethodBase.cs" />
    <Compile Include="System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodBody.cs" />
    <Compile Include="System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodDecoder.cs" />
    <Compile Include="System\Reflection\TypeLoading\MethodBase\RoExceptionHandlingClause.cs" />
    <Compile Include="System\Reflection\TypeLoading\MethodBase\RoLocalVariableInfo.cs" />
    <Compile Include="System\Reflection\TypeLoading\MethodBase\RoMethodBody.cs" />
    <Compile Include="System\Reflection\TypeLoading\Methods\RoConstructedGenericMethod.cs" />
    <Compile Include="System\Reflection\TypeLoading\Methods\RoDefinitionMethod.cs" />
    <Compile Include="System\Reflection\TypeLoading\Methods\RoDefinitionMethod.DllImport.cs" />
    <Compile Include="System\Reflection\TypeLoading\Methods\RoMethod.cs" />
    <Compile Include="System\Reflection\TypeLoading\Methods\RoSyntheticMethod.cs" />
    <Compile Include="System\Reflection\TypeLoading\Modules\GetTypeCoreCache.cs" />
    <Compile Include="System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.cs" />
    <Compile Include="System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.GetTypeCore.cs" />
    <Compile Include="System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.ManifestResources.cs" />
    <Compile Include="System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.MetadataTables.cs" />
    <Compile Include="System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.TypeProvider.cs" />
    <Compile Include="System\Reflection\TypeLoading\Modules\RoModule.cs" />
    <Compile Include="System\Reflection\TypeLoading\Modules\RoModule.Unifier.cs" />
    <Compile Include="System\Reflection\TypeLoading\Modules\RoResourceModule.cs" />
    <Compile Include="System\Reflection\TypeLoading\Parameters\Ecma\EcmaFatMethodParameter.cs" />
    <Compile Include="System\Reflection\TypeLoading\Parameters\RoFatMethodParameter.cs" />
    <Compile Include="System\Reflection\TypeLoading\Parameters\RoMethodParameter.cs" />
    <Compile Include="System\Reflection\TypeLoading\Parameters\RoParameter.cs" />
    <Compile Include="System\Reflection\TypeLoading\Parameters\RoPropertyIndexParameter.cs" />
    <Compile Include="System\Reflection\TypeLoading\Parameters\RoThinMethodParameter.cs" />
    <Compile Include="System\Reflection\TypeLoading\Properties\Ecma\EcmaProperty.cs" />
    <Compile Include="System\Reflection\TypeLoading\Properties\RoProperty.cs" />
    <Compile Include="System\Reflection\TypeLoading\RuntimeTypeInfo.BindingFlags.cs" />
    <Compile Include="System\Reflection\TypeLoading\RuntimeTypeInfo.GetMember.cs" />
    <Compile Include="System\Reflection\TypeLoading\RuntimeTypeInfo.TypeComponentsCache.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.BindingFlags.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\Ecma\EcmaGenericMethodParameterType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\Ecma\EcmaGenericParameterType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\Ecma\EcmaGenericTypeParameterType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoArrayType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoArrayType.Key.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoByRefType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoConstructedGenericType.Key.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoDefinitionType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoExceptionType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoGenericParameterType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoHasElementType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoInstantiationProviderType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoModifiedHasElementType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoModifiedFunctionPointerType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoModifiedGenericType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoModifiedStandaloneType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoModifiedType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoPinnedType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoPointerType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoStubType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoType.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoType.GetInterface.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoType.TypeClassification.cs" />
    <Compile Include="System\Reflection\TypeLoading\Types\RoWrappedType.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs" Link="Common\System\Obsoletions.cs" />
    <Compile Include="System\ThrowHelper.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\UnconditionalSuppressMessageAttribute.cs" />
    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\RequiresUnreferencedCodeAttribute.cs" />
  </ItemGroup>

  <ItemGroup>
    <!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
    <ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Immutable\src\System.Collections.Immutable.csproj" />
    <ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Metadata\src\System.Reflection.Metadata.csproj" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
    <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
  </ItemGroup>

</Project>
